﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ListTimeSlots.aspx.cs" Inherits="cs499.TimeSlots.ListTimeSlots" %>
<%@ MasterType VirtualPath="~/Site.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="NavOptions" runat="server">
    <ul>
        <li><asp:LinkButton ID="addTimeSlotButton" runat="server" PostBackUrl="~/TimeSlots/AddTimeSlot.aspx">Add Time Slot</asp:LinkButton></li>
        <li><asp:LinkButton ID="deleteTimeSlotButton" runat="server" PostBackUrl="~/TimeSlots/DeleteTimeSlots.aspx">Delete Time Slot(s)</asp:LinkButton></li>
        <li><asp:LinkButton ID="importTimeSlotButton" runat="server" PostBackUrl="~/TimeSlots/ImportTimeSlot.aspx">Import Time Slot(s)</asp:LinkButton></li>
        <li><asp:LinkButton ID="exportTimeSlotButton" runat="server" OnClick="exportTimeSlotButton_Click">Export Time Slot(s)</asp:LinkButton></li>
    </ul>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="FeaturedContent" runat="server">
    <section class="featured">
        <div class="content-wrapper">
            <h3>List of Time Slots</h3>
            
        </div>
    </section>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="MainContent" runat="server">
    
    <asp:GridView ID="GridView1" runat="server" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="EntityDataSource2">
        <Columns>
            <asp:TemplateField HeaderText="Days" SortExpression="Days">
                <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# cs499.Database.TimeSlot.DaystoString((cs499.Database.DayOfWeek)Eval("Days")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="StartTime" HeaderText="StartTime" SortExpression="StartTime" />
            <asp:BoundField DataField="Length" HeaderText="Length" SortExpression="Length" />
        </Columns>
    </asp:GridView>
    <asp:EntityDataSource ID="EntityDataSource2" runat="server" ConnectionString="name=Model1Container" DefaultContainerName="Model1Container" EnableFlattening="False" EntitySetName="TimeSlots" EntityTypeFilter="TimeSlot">
    </asp:EntityDataSource>
    
</asp:Content>
